skills(objectstack-ui): state the one-app-per-package cap in App Navigation (GOVERNED — over the token ratchet by 59, needs a maintainer decision) - #17310
Draft
baozhoutao wants to merge 1 commit into
Conversation
…gation
The App Navigation section tells an author to `register under
defineStack({ apps: [...] })` and stops there. Nothing in the published
bundle says the array holds one entry: measured across `skills/`, the
one-app rule appears 0 times in any spelling, while `defineStack` appears
54 times and `App.create` 3 — the zeros are readings, not an empty corpus.
An agent authoring `*.app.ts` from this skill therefore has no reason not
to write one app per audience, and finds out at `defineStack` load time,
after the design is written.
All three `ADR-0019` citations in the published bundle point at
`0019-approval-as-flow-node`, so this one names its record explicitly.
⚠️ This overruns the published-skills token ratchet by 59 tokens
(3874 against a ceiling of 3815, headroom measured at 0 before writing).
The ceiling is deliberately NOT touched and nothing else is trimmed to
pay for it — both are maintainer decisions. See the PR body.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Item 2 of #16565. This PR does not close that card — item 1/3 ship in the companion PR #17309 and item 4 remains open. No closing keyword is used here.
维护者速读(草稿)
改了什么 ——
skills/objectstack-ui/SKILL.md的 App Navigation 一节加三行:一个type: 'app'包只暴露一个 App,多受众是它内部用requiredPermissions门控的分组,并把ADR-0019写成指名到app-as-consumer-unit记录。只加这一处,不动别的。为什么改 —— 这是 AI 作者真正会读的地方。发布包里的实测:一个 app 的规则出现 0 次(所有拼写),而
defineStack出现 54 次、App.create3 次 —— 零是读数,不是空语料。照这份技能写*.app.ts的 agent 没有任何理由不按受众开三个 app,直到defineStack在 load 期抛出;卡片记录的真实代价是「一个设计小节 + 一张卡 + 一次已派发的实现」全部重做。发布包里现有的 3 处ADR-0019全部指向 approvals 那份记录,所以顺着引用走的作者会落到错误的 ADR。风险与代价(含回滚) —— ⭐ 代价是 59 个 token,而
skills/objectstack-ui/SKILL.md的余量实测为 0(3815/3815)。 加完是 3874,超出 59。门禁自己的判定行:✗ ... is 3874 tokens; the ratchet ceiling is 3815 (over by 59) ... ⛔ MAINTAINER-ONLY。⛔ 我没有动上限常量,也没有为了腾空间删任何别的内容 —— 按门禁自己的规则,抬上限只能落在「正文引用了维护者裁决」的 PR 里,而我拿不出这样一条裁决;删内容则是替你做编辑判断。两者都留给你。回滚成本为零:单文件、三行、无代码、无生成物,关掉 PR 即可。席位意见 —— (留空,待席位定稿)
你要做的 —— 三选一:① 认为这 59 token 值得,给出裁决并授权抬 ceiling(定稿时把裁决原话贴进本正文);② 认为不值得,关掉本 PR —— 规则仍由 #17309 在文档面陈述,只是 agent 读不到;③ 指定同文件内一处等量删减来支付,我据此改。⛔ 无论哪一个,#16565 都不因本 PR 关闭。
The measurement, re-derived
Taken on
origin/mainatb90aff81f2, over the whole published bundle. Every zero carries a same-corpus positive control from the same pass.So the rule is absent in every spelling from a bundle that names
defineStack54 times, and the number an author would follow resolves, in this bundle's own usage, to the wrong record.The price — measured before writing, exactly as instructed
Headroom was read first, from the gate rather than assumed:
15260 is exactly divisible by the gate's 4-bytes-per-token convention, so the headroom is not merely small — a single added byte overflows it.
Package total, for the whole-package reading this surface owes:
The gate's own verdict line, run on this branch after the edit (
node scripts/check-skills-token-ratchet.mjs, exit 1 — a finding, not aPREREQUISITE NOT MET3):I hold no such ruling, so the ceiling stays where it is and this PR stays red.
Why nothing was trimmed to pay for it. The obvious candidate is the section's opening sentence — "An App groups objects, dashboards, reports, and custom pages into a structured navigation tree" — which is arguably restated by the navigation-item-types table directly beneath it. That is an editorial judgement about someone else's prose, made only to buy budget, and it is offered here as an option rather than performed.
rules/navigation.mdis not an escape either: it is also at exactly 0 headroom (2273/2273). Checked for genuine redundancy between the two files —separator,componentRef,actionDef,requiresService,recordIdeach appear inSKILL.mdand zero times inrules/navigation.md, so the section duplicates nothing and there is no free deletion to take.Changeset: measured separately, and the answer is the label
Not a changeset — the
skip-changesetlabel. Measured rather than assumed: no package manifest'sfiles[]containsskills(checked across every trackedpackage.json),skills/is not a workspace member, and the root manifest is private.pr-automation.ymlspells this exact case out, including that an empty-frontmatter changeset is now rejected and that the label is what "names no package" is for. The label is applied on this PR.Verification
Gate family derived from this diff, not recalled:
pnpm --filter @objectstack/lint run check:doc-formula-expressionsfirst returned exit 3 —PREREQUISITE NOT MET, which is neither green nor red — and was driven to a real verdict (exit 0) after building@objectstack/formulaand@objectstack/lint.pnpm check:pm-governed-merges,check:skill-frame-sync,check:skill-compatibility,check:skill-identifier-liveness,check:nul-bytesandcheck:doc-authoringall exit 0. Exit codes captured before any pipe.🤖 Generated with Claude Code
https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU
Generated by Claude Code